<?php


namespace app\common\model;


class GroupModel extends CommonModel
{
    protected $name = 'group';
    //protected $hidden = ['delete_time'];

    public function roles()
    {
        return $this->belongsToMany(RoleModel::class, GroupRoleModel::class,'role_id','group_id');
        //return $this->hasManyThrough(RoleModel::class, ,'group_id','group_id','group_id','role_id');
    }
}